/*
--| This section is commented out to prevent accidental deletion of existing stored procedure's.
--| This can be uncommented after the stored procedure is created and confirmed that another stored procedure
--| with the same name does not exists.
--|
--| Drop stored procedure if it already exists
IF EXISTS (
  SELECT * 
    FROM INFORMATION_SCHEMA.ROUTINES 
   WHERE SPECIFIC_SCHEMA = N'dbo'
     AND SPECIFIC_NAME = N'au_getProgramsEnum' 
)
   DROP PROCEDURE dbo.au_getProgramsEnum
GO

*/

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--|--------------------------------------------------------------------------------------------------------------
--|Name:			au_getProgramsEnum
--|Author:			Jamie Swindall
--|Description:		Returns and enumeration of viewable Programs.
--|-------------------------------------------------------------------------------------------------------------- 
--|------------- Parameters -------------------------------------------------------------------------------------
--|--------------------------------------------------------------------------------------------------------------
--| Name		||	Data Type	||	Default Value	||	Description
--|--------------------------------------------------------------------------------------------------------------
--|
--|--------------------------------------------------------------------------------------------------------------
--|--------------------------- Revision Information	-------------------------------------------------------------				 
--|--------------------------------------------------------------------------------------------------------------
--|	Author:				Date			Change					Description							SCR #
--|--------------------------------------------------------------------------------------------------------------
--|	Jamie Swindall		03/21/2011	Initial version						
--|														
--|--------------------------------------------------------------------------------------------------------------

CREATE PROCEDURE dbo.au_getProgramsEnum
AS
BEGIN
	SET NOCOUNT ON;

	SELECT
				Id, Name AS Program
	FROM
				au_Program
	ORDER BY
				Id	 

END
GO

/*
-- =============================================
-- Example to execute the stored procedure
-- =============================================
EXECUTE dbo.au_getProgramsEnum
GO
*/